package com.cqcomponents.components;

import org.apache.commons.lang.StringUtils;

import com.cqcomponents.annotations.JcrPropertyInjection;

public class Headline extends BaseComponent {
	private String text = "";
	private int size = 1;

	@JcrPropertyInjection
	public void setText(String text) {
		this.text = text;
	}

	@Override
	public boolean getHasContent() {
		return StringUtils.isNotBlank(this.text);
	}

	@JcrPropertyInjection
	public void setSize(int size) {
		this.size = size;
	}

	public int getSize() {
		return size;
	}

	public String getText() {
		return text;
	}

	@Override
	public String toString() {
		return "Headline {text:" + this.text + ", size:" + this.size + "}";
	}

}
